<div class="backing-service-instance">
    <!--<h2 class="h2-border">Devops</h2>-->

    <div class="instance" ng-repeat="item in bsi.items">
        <div class="instance-bar">
            <div class="row">
                <div class="col-md-3">
                    <h3>{{item.metadata.name}}</h3>
                    <p>{{item.spec.provisioning.backingservice_name}}</p>
                </div>
                <div class="col-md-3">
                    <p>状态: {{item.status.phase | bsiphaseFilter}}</p>
                    <p>创建时间: {{item.metadata.creationTimestamp | dateRelative}}</p>
                </div>
                <div class="col-md-3">
                    <p>套餐名称: <a href="javascript:;" ng-click="jump($index)" class="href-orange">{{item.spec.provisioning.backingservice_plan_name}}</a></p>
                    <p>绑定服务个数: {{item.spec.bound}}</p>
                </div>
                <div class="col-md-3">
                    <a href="javascript:;" ng-click="item.show=!item.show" class="fa2 fa2-link" uib-tooltip="服务绑定"></a>
                    <!--<a href="javascript:;" ng-click="update($index)" class="fa2 fa2-update" uib-tooltip="升级套餐"></a>-->
                    <a ng-if="item.spec.provisioning.dashboard_url" href="{{item.spec.provisioning.dashboard_url}}" target="_blank" class="fa2 fa2-dashboard" uib-tooltip="Dashboard"></a>
                    <a href="javascript:;" class="faa faa-times" uib-tooltip="删除" ng-click="delBsi($index)"></a>
                </div>
            </div>
        </div>
        <div class="binding-services" uib-collapse="!item.show">
            <div style="padding: 30px;">
                <h2>
                    <!--绑定服务-->
                    <!--<a href="javascript:;" class="btn btn-orange" ng-click="delBing($index)">解除绑定</a>-->
                    <a href="javascript:;" class="btn btn-green" ng-click="bindModal($index)">新增绑定</a>
                </h2>

                <div class="panel-group" role="tablist" aria-multiselectable="true" style="margin-bottom: 0;">
                    <div class="panel panel-default" ng-repeat="bsisv in item.spec.binding">
                        <div class="panel-heading" role="tab">
                            <h4 class="panel-title">
                                <!--<a ng-class="{'active': bsisv.checked}" ng-click="bsisv.checked=!bsisv.checked" style="cursor: pointer">-->
                                    <!--<i class="faa faa-check"></i>&nbsp;-->
                                <!--</a>-->
                                <a href="#{{item.metadata.name}}-{{bsisv.bind_deploymentconfig}}" data-toggle="collapse" class="accordion-toggle">
                                    {{bsisv.bind_deploymentconfig}}
                                    <i class="fa pull-right" ng-class="{'fa-caret-up': status.open, 'fa-caret-down': !status.open}" style="color: #5a6378;"></i>
                                </a>
                                <span class="label label-default" uib-tooltip="{{bsisv.bound_time | timescon}}">
                                    <i class="fa2 fa2-time"></i>&nbsp;{{bsisv.bound_time | dateRelative}}
                                </span>
                                <a class="href-orange" ng-click="delebind(item,bsisv.bind_deploymentconfig)" style="color:#5b73eb;float: right;margin-right: 10px;cursor: pointer;">解除绑定</a>
                            </h4>
                        </div>
                        <div id="{{item.metadata.name}}-{{bsisv.bind_deploymentconfig}}" class="panel-collapse collapse" role="tabpanel">
                            <div class="panel-body">
                                <div ng-repeat="(k, v) in bsisv.credentials" ng-if='bsisv.credentials' >
                                    <p style="word-break: keep-all"><strong>{{k}}: </strong>{{v}}</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>